﻿<Window x:Class="TeamBuildScreenSaver.Views.ScreenSaverSettings"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:TeamBuildScreenSaver.Views"
    Title="Team Build Screen Saver Settings" Height="460" Width="512" local:AttachedProperties.RegisterCommandBindings="{Binding Path=CommandBindings}" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
  <Window.Resources>

  </Window.Resources>
  <Window.Background>
    <LinearGradientBrush>
      <GradientStop Color="#FF2B2077" Offset="4"/>
      <GradientStop Color="#FFFFFFFF" Offset="0"/>
    </LinearGradientBrush>
  </Window.Background>
  <Window.CommandBindings>
    <CommandBinding Command="ApplicationCommands.Close" CanExecute="CloseCanExecute" Executed="CloseExecuted"/>
  </Window.CommandBindings>
  <Grid>
    <Button Height="26.52" Margin="0,8,8,0" VerticalAlignment="Top" Command="{Binding Path=SelectTfsServer}" Width="86.478" HorizontalAlignment="Right" Grid.Column="1" Content="Select..."/>
    <Label Height="28" HorizontalContentAlignment="Right" HorizontalAlignment="Left" Margin="8,8,0,0" VerticalAlignment="Top" Width="151" FontWeight="Bold" Content="Team Foundation Server:" d:LayoutOverrides="GridBox"/>
    <ListView Margin="8,72,8,104" SelectionMode="Multiple" ItemsSource="{Binding Path=Builds}" Background="#7FFFFFFF" d:LayoutOverrides="GridBox">
      <ListView.ItemContainerStyle>
        <Style TargetType="ListViewItem">
          <Setter Property="HorizontalContentAlignment"
                  Value="Stretch" />
        </Style>
      </ListView.ItemContainerStyle>
      <ListView.View>
        <GridView AllowsColumnReorder="True">
          <GridViewColumn>
            <GridViewColumn.CellTemplate>
              <DataTemplate>
                <CheckBox VerticalAlignment="Center" HorizontalAlignment="Center" IsChecked="{Binding Path=IsEnabled}" Margin="2,0,2,0" />
              </DataTemplate>
            </GridViewColumn.CellTemplate>
          </GridViewColumn>
          <GridViewColumn Header="Team Project" DisplayMemberBinding="{Binding Path=TeamProject}" />
          <GridViewColumn Header="Build Definition" DisplayMemberBinding="{Binding Path=DefinitionName}" Width="175" />
          <GridViewColumn Header="Configuration">
            <GridViewColumn.CellTemplate>
              <DataTemplate>
                <ComboBox IsEditable="True" Text="{Binding Path=Configuration}" IsEnabled="{Binding Path=IsEnabled}" VerticalAlignment="Center" Margin="2,0,2,0">
                  <ComboBoxItem Content="Release"/>
                  <ComboBoxItem Content="Debug"/>
                </ComboBox>
              </DataTemplate>
            </GridViewColumn.CellTemplate>
          </GridViewColumn>
          <GridViewColumn Header="Platform">
            <GridViewColumn.CellTemplate>
              <DataTemplate>
                <ComboBox IsEditable="True" Text="{Binding Path=Platform}" IsEnabled="{Binding Path=IsEnabled}" VerticalAlignment="Center" Margin="2,0,2,0">
                  <ComboBoxItem Content="Any CPU"/>
                </ComboBox>
              </DataTemplate>
            </GridViewColumn.CellTemplate>
          </GridViewColumn>
        </GridView>
      </ListView.View>
    </ListView>
    <Label Height="28" Margin="8,40,8,0" VerticalAlignment="Top" FontWeight="Bold" Grid.ColumnSpan="2" Content="Build Definitions:"/>
    <Label HorizontalContentAlignment="Right" Height="28" HorizontalAlignment="Left" Margin="-26,0,0,72" VerticalAlignment="Bottom" Width="102.522" FontWeight="Bold" Grid.Column="1" Content="Columns:"/>
    <ComboBox VerticalContentAlignment="Center" Height="28" Margin="80.522,0,0,72" VerticalAlignment="Bottom" SelectedValue="{Binding Path=Columns}" SelectedValuePath="Content" Width="44.478" HorizontalAlignment="Left" Grid.Column="1">
      <ComboBoxItem Content="1"/>
      <ComboBoxItem Content="2"/>
      <ComboBoxItem Content="3"/>
      <ComboBoxItem Content="4"/>
      <ComboBoxItem Content="5"/>
    </ComboBox>
    <Label HorizontalContentAlignment="Right" Height="28" Margin="207.696,0,151.782,72" VerticalAlignment="Bottom" FontWeight="Bold" Grid.Column="1" Content="Refresh every:"/>
    <ComboBox VerticalContentAlignment="Center" Height="28" Margin="0,0,103.304,72" VerticalAlignment="Bottom" SelectedValue="{Binding Path=UpdateInterval}" SelectedValuePath="Tag" Width="44.478" HorizontalAlignment="Right" Grid.Column="1">
      <ComboBoxItem Content="15" Tag="15000" />
      <ComboBoxItem Content="30" Tag="30000" />
      <ComboBoxItem Content="45" Tag="45000" />
      <ComboBoxItem Content="60" Tag="60000" />
    </ComboBox>
    <Label Height="28" Margin="0,0,8,72" VerticalAlignment="Bottom" Width="91.304" HorizontalAlignment="Right" Grid.Column="1" Content="seconds"/>
    <Button Height="28" HorizontalAlignment="Right" Margin="0,0,103.304,8" VerticalAlignment="Bottom" Width="91.304" Command="ApplicationCommands.Save" Grid.Column="1" Content="Save"/>
    <Button Height="28" HorizontalAlignment="Right" Margin="0,0,8,8" VerticalAlignment="Bottom" Width="91.304" Command="ApplicationCommands.Close" Grid.Column="1" Content="Close"/>
    <TextBox VerticalContentAlignment="Center" Margin="163,8,98.478,0" VerticalAlignment="Top" Height="28" Text="{Binding Path=TfsUri}" IsReadOnly="True" TextWrapping="NoWrap" d:LayoutOverrides="GridBox"/>
  </Grid>
</Window>
